package fiuba.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class BannerItem extends BaseObject{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7648047904261664741L;

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}
	
	private Long id;
	private Banner banner;
	private int tipo;
	private String url;
	private String link;
	private boolean nuevaVentana;
	private int posibilidad;
	private int ancho;
	private int alto;
	
	@Column
	public int getAncho() {
		return ancho;
	}

	public void setAncho(int ancho) {
		this.ancho = ancho;
	}
	@Column
	public int getAlto() {
		return alto;
	}

	public void setAlto(int alto) {
		this.alto = alto;
	}

	@Id @GeneratedValue(strategy = GenerationType.AUTO) 
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	@ManyToOne
    @JoinColumn(name="banner_fk")
	public Banner getBanner() {
		return banner;
	}

	public void setBanner(Banner banner) {
		this.banner = banner;
	}
	@Column
	public int getTipo() {
		return tipo;
	}

	public void setTipo(int tipo) {
		this.tipo = tipo;
	}
	@Column(length=100)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	@Column(length=100)
	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}
	@Column
	public boolean isNuevaVentana() {
		return nuevaVentana;
	}

	public void setNuevaVentana(boolean nuevaVentana) {
		this.nuevaVentana = nuevaVentana;
	}
	@Column
	public int getPosibilidad() {
		return posibilidad;
	}

	public void setPosibilidad(int posibilidad) {
		this.posibilidad = posibilidad;
	}
	
	

}
